package com.hmdp.utils;

/**
 * @author HeJin
 */
public class RedisConstants {

    /**
     * 登录验证码的key前缀
     */
    public static final String LOGIN_CODE_KEY = "login:code:";

    /**
     * 登录验证码过期时间，单位为分钟
     */
    public static final Long LOGIN_CODE_TTL = 2L;

    /**
     * 登录用户key前缀
     */
    public static final String LOGIN_USER_KEY = "login:token:";

    /**
     * 登录有效期
     */
    public static final Long LOGIN_USER_TTL = 30L;

    public static final Long CACHE_NULL_TTL = 2L;

    public static final Long CACHE_SHOP_TTL = 30L;
    public static final String CACHE_SHOP_KEY = "cache:shop:";

    public static final String LOCK_SHOP_KEY = "lock:shop:";
    public static final Long LOCK_SHOP_TTL = 10L;

    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
    public static final String BLOG_LIKED_KEY = "blog:liked:";
    public static final String FEED_KEY = "feed:";
    public static final String SHOP_GEO_KEY = "shop:geo:";
    public static final String USER_SIGN_KEY = "sign:";

    /**
     * 店铺类型key
     */
    public static final String CACHE_SHOP_TYPE_KEY = "cache:shopType";

    /**
     * null值
     */
    public static final String CACHE_NULL_VALUE = "";

    /**
     * 全局ID生成器
     */
    public static final String ID_WORKER = "icr:";
    public static final String FOLLOWS_KEY = "follows:";
}
